package com.after.saas.common.model.bo;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 *
 * </p>
 *
 * @author hjchen
 * @since 2023-10-28
 */
@Data
public class OkxCoinBO implements Serializable {

    private static final long serialVersionUID = 1L;

    @ExcelIgnore
    private Integer id;

    @ExcelIgnore
    private String account;
    @ExcelProperty(value = "时间")
    private LocalDateTime tradeTime;
    @ExcelProperty(value = "类型")
    private String tradeType;
    @ExcelProperty(value = "数量")
    private BigDecimal num;
    @ExcelProperty(value = "转账前余额")
    private BigDecimal beforeBalance;
    @ExcelProperty(value = "转账后余额")
    private BigDecimal afterBalance;
    @ExcelProperty(value = "手续费")
    private BigDecimal charge;
    @ExcelProperty(value = "币种")
    private String currency;

    public void setBeforeBalance(BigDecimal beforeBalance) {
        this.beforeBalance = beforeBalance.setScale(4,BigDecimal.ROUND_HALF_DOWN);
    }

    public void setAfterBalance(BigDecimal afterBalance) {
        this.afterBalance = afterBalance.setScale(4,BigDecimal.ROUND_HALF_DOWN);
    }

}
